import React, { lazy } from 'react'
import { createBrowserRouter } from 'react-router-dom'
const Home=lazy(()=>import('../Page/Home'))
const User=lazy(()=>import('../Page/User'))
const Order=lazy(()=>import('../Page/Order'))
const Message=lazy(()=>import('../Page/Message'))
const List=lazy(()=>import('../Page/List'))
const Detail=lazy(()=>import('../Page/Detail'))
const MainLayout=lazy(()=>import('../Page/MainLayout'))
export const router=createBrowserRouter([
    {
        path:'/',
        element:<MainLayout/>,
        children:[
            {
                path:'/',
                element:<Home/>
            },
            {
                path:'/user',
                element:<User/>
            },
            {
                path:'/order',
                element:<Order/>
            },
            {
                path:'/message',
                element:<Message/>
            }
        ]
    },
    {
        path:'/list',
        element:<List/>
    },
    {
        path:'/detail',
        element:<Detail/>

    }

])